package cn.jietuo.builder;

/**
 * @author zhangx & jietuo_zx@163.com
 * @version 1.0
 * @date 2021/3/7
 * @description:  默认的产品构造器
 */
public class DefaultConcreteProductBuilder implements  ProductBuilder {

    private String productName;

    private String companyName;

    private String part1;

    private String part2;


    @Override
    public void  builderProductName(String productName) {
        this.productName = productName;
    }

    @Override
    public void builderProductCompanyName(String companyName) {
        this.companyName = companyName;
    }

    @Override
    public void builderPart1(String part1) {
        this.part1 = part1;
    }

    @Override
    public void builderPart2(String part2) {
        this.part2 = part2;
    }

    @Override
    public Product build() {
        return new Product(this.productName,this.companyName,this.part1,this.part2);
    }
}
